import {NgModule} from '@angular/core';
import {CommonModule, DatePipe} from '@angular/common';
import {Routes, RouterModule, PreloadAllModules} from '@angular/router';
import {IonicModule} from '@ionic/angular';

// 组件
import {DemoComponent} from '../../pages/demo/demo.component';
import {ComponentModule} from '../../component/component.module';
import {ListComponent} from '../../pages/demo/list/list.component';
import {OtherComponent} from '../../pages/demo/other/other.component';

const routes: Routes = [
    {
        path: 'details',
        component: DemoComponent
    }
];

@NgModule({
    declarations: [
        DemoComponent,
        ListComponent,
        OtherComponent
    ],
    imports: [
        CommonModule,
        RouterModule.forChild(routes),
        ComponentModule,
        IonicModule,
    ],
    exports: [RouterModule],
    providers: [DatePipe]
})
export class DemoModule {
}
